package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CgAgenteCaso generated by hbm2java
 */
@Entity
@Table(name = "CG_AGENTE_CASO", schema = "UPET")
public class CgAgenteCaso implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6924466828185398922L;
	private CgAgenteCasoId id;
	private CgAgenteAduan cgAgenteAduan;
	private CgCaso cgCaso;
	private Date fiasignacion;
	private Date ffasignacion;
	private String cusuario;
	private Date fhingreso;

	public CgAgenteCaso() {
	}

	public CgAgenteCaso(CgAgenteCasoId id, CgAgenteAduan cgAgenteAduan,
			CgCaso cgCaso, Date fiasignacion, String cusuario, Date fhingreso) {
		this.id = id;
		this.cgAgenteAduan = cgAgenteAduan;
		this.cgCaso = cgCaso;
		this.fiasignacion = fiasignacion;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	public CgAgenteCaso(CgAgenteCasoId id, CgAgenteAduan cgAgenteAduan,
			CgCaso cgCaso, Date fiasignacion, Date ffasignacion,
			String cusuario, Date fhingreso) {
		this.id = id;
		this.cgAgenteAduan = cgAgenteAduan;
		this.cgCaso = cgCaso;
		this.fiasignacion = fiasignacion;
		this.ffasignacion = ffasignacion;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "nitagenteAduanal", column = @Column(name = "NIT_AGENTE_ADUANAL", nullable = false, length = 14)),
			@AttributeOverride(name = "ncaso", column = @Column(name = "N_CASO", nullable = false, precision = 10, scale = 0)) })
	public CgAgenteCasoId getId() {
		return this.id;
	}

	public void setId(CgAgenteCasoId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT_AGENTE_ADUANAL", nullable = false, insertable = false, updatable = false)
	public CgAgenteAduan getCgAgenteAduan() {
		return this.cgAgenteAduan;
	}

	public void setCgAgenteAduan(CgAgenteAduan cgAgenteAduan) {
		this.cgAgenteAduan = cgAgenteAduan;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "N_CASO", nullable = false, insertable = false, updatable = false)
	public CgCaso getCgCaso() {
		return this.cgCaso;
	}

	public void setCgCaso(CgCaso cgCaso) {
		this.cgCaso = cgCaso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FI_ASIGNACION", nullable = false, length = 7)
	public Date getFiasignacion() {
		return this.fiasignacion;
	}

	public void setFiasignacion(Date fiasignacion) {
		this.fiasignacion = fiasignacion;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_ASIGNACION", length = 7)
	public Date getFfasignacion() {
		return this.ffasignacion;
	}

	public void setFfasignacion(Date ffasignacion) {
		this.ffasignacion = ffasignacion;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

}
